package cn.com.wind.bdg.polish.polish;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

import cn.com.wind.bdg.polish.polish.service.PollContentFKafka;
import cn.com.wind.bdg.polish.polish.service.UrlData2KafkaService;

@SpringBootApplication
public class PolishApplication implements ApplicationRunner {

	public static void main(String[] args) {
		SpringApplication.run(PolishApplication.class, args);
	}
	
	@Autowired
	private PollContentFKafka pollContentFKafka;
	@Autowired
	private UrlData2KafkaService urlData2KafkaService;
	@Override
	public void run(ApplicationArguments args) throws Exception {
		//从kafka上拉取原始网页
//		pollContentFKafka.pollKafka();
		//将详情数据存入kafka
		urlData2KafkaService.dealKafka();
	}

}
